<?php	

	Route::group('admin',function(){
		Route::rule('index','admin/index/index')->middleware('checklogin');
		Route::rule('','admin/index/index')->middleware('checklogin');
		Route::rule('welcome','admin/index/welcome')->middleware('checklogin');
		
	});

	Route::group('admin',function(){
		//管理员列表	
		Route::group('admin',function(){
			Route::rule('list','admin/admin/list');
			Route::rule('add','admin/admin/add');
			Route::rule('edit/[:admin_id]','admin/admin/edit');
			Route::rule('del','admin/admin/del');
		});
		//角色管理分组	
		Route::group('role',function(){
			Route::rule('list','admin/role/list');
			Route::rule('add','admin/role/add');
			Route::rule('edit/[:role_id]','admin/role/edit');
			Route::rule('del','admin/role/del');
		});
		//权限管理分组
		Route::group('rule',function(){
			Route::rule('list','admin/rule/list');
			Route::rule('add','admin/rule/add');
			Route::rule('edit/[:mod_id]','admin/rule/edit');
			Route::rule('del','admin/rule/del');
		});
		//品牌车型管理分组
		Route::group('car',function(){
			Route::rule('brandlist','admin/car/brandlist');
			Route::rule('brandadd','admin/car/brandadd');
			Route::rule('branddel','admin/car/branddel');
			Route::rule('brandedit/[:bid]','admin/car/brandedit');
		});
		//车系管理分组
		Route::group('car',function(){
			Route::rule('cate','admin/car/cate');
			Route::rule('cateadd','admin/car/cateadd');
			Route::rule('catedel','admin/car/catedel');
			Route::rule('cateedit/[:id]','admin/car/cateedit');
		});
		//车型管理分组
		Route::group('car',function(){
			Route::rule('type','admin/car/type');
			Route::rule('typeadd','admin/car/typeadd');
			Route::rule('typedel','admin/car/typedel');
			Route::rule('typeedit/[:tid]','admin/car/typeedit');
		});
		//车级管理分组
		Route::group('car',function(){
			Route::rule('level','admin/car/level');
			Route::rule('leveladd','admin/car/leveladd');
			Route::rule('leveldel','admin/car/leveldel');
			Route::rule('leveledit/[:lid]','admin/car/leveledit');
		});
		//车源全局配置管理分组
		Route::group('system',function(){
			Route::rule('carconfig','admin/system/carconfig');
			Route::rule('carconfigadd','admin/system/carconfigadd');
			Route::rule('carconfigdel','admin/system/carconfigdel');
			Route::rule('carconfigedit/[:cid]','admin/system/carconfigedit');
		});
		//车源管理分组
		Route::group('carsource',function(){
			Route::rule('carsource','admin/carsource/carsource');
			Route::rule('carsourceadd','admin/carsource/carsourceadd');
			Route::rule('carsourcedel','admin/carsource/carsourcedel');
			Route::rule('carsourceedit/[:sid]','admin/carsource/carsourceedit');
		});

		//会员管理分组
		Route::group('Member',function(){
			Route::rule('memList','admin/member/memList');
			Route::rule('memListAdd','admin/member/memListAdd');
			Route::rule('memListEdit/[:id]','admin/member/memListEdit');
			Route::rule('memListDel','admin/member/memListDel');
			Route::rule('evaluate','admin/member/evaluate');
			Route::rule('evaluatedel','admin/member/evaluatedel');
		});

		//模块管理分组
		Route::group('Module',function(){
			Route::rule('ad','admin/module/ad');
			Route::rule('adadd','admin/module/adadd');
			Route::rule('addel','admin/module/addel');
			Route::rule('adedit/[:id]','admin/module/adedit');
			Route::rule('fl','admin/module/fl');
			Route::rule('fladd','admin/module/fladd');
			Route::rule('fledit/[:id]','admin/module/fledit');
			Route::rule('fldel','admin/module/fldel');
			Route::rule('newscontent','admin/module/newscontent');
			Route::rule('newscontentmore/[:id]','admin/module/newscontentmore');
			Route::rule('newscontentadd','admin/module/newscontentadd');
			Route::rule('newscontentedit/[:id]','admin/module/newscontentedit');
			Route::rule('newscontentdel','admin/module/newscontentdel');
			Route::rule('newsclassify','admin/module/newsclassify');
			Route::rule('newsclassifyadd','admin/module/newsclassifyadd');
			Route::rule('newsclassifyedit/[:id]','admin/module/newsclassifyedit');
			Route::rule('newsclassifydel','admin/module/newsclassifydel');
		});
	})->middleware('checkauth');

	Route::rule('admin/login','admin/index/login')->middleware('checkrepeat');


	Route::group('home',function(){
		//前台注册登录主页
		Route::rule('register','home/home/register');
		Route::rule('login','home/home/login');
		Route::rule('index','home/home/index');

		//前台宝典宝典详情
		Route::rule('news','home/newshow/news');
		Route::rule('newsinfo/[:id]','home/newshow/newsinfo');

		//前台用户中心修改密码
		Route::rule('user','home/Userm/user')->middleware('checkad');
		Route::rule('uppwd','home/Userm/uppwd')->middleware('checkad');

		Route::rule('buycar','home/home/buycar');
		Route::rule('cardetail/[:sid]','home/home/cardetail');
		Route::rule('sellcar','home/home/sellcar')->middleware('checkad');
		Route::rule('area','home/home/area');
	});




